import request from '@/api/request'
import type { User } from '@/types/User'
import type { ApiResponse } from '@/api/types'

export async function updateUserInfo(data: Partial<User>) {
  return request<ApiResponse<User>>({
    url: '/auth/update',
    method: 'POST',
    data,
  })
}

export async function getProfile() {
  return request<User>({
    url: '/user/profile',
    method: 'GET',
  })
}
